﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace C_初级教程
{

    /// <summary>
    /// 正则表达式
    /// </summary>
    public class RegularExpress
    {
        public string test()
        {
            Regex regex = new Regex(@"[0-9A-Za-z_]+([-+.][0-9A-Za-z_]+)*@[0-9A-Za-z_]+([-.][0-9A-Za-z_]+)*\.[0-9A-Za-z_]+([-.][0-9A-Za-z_]+)");
            if (regex.IsMatch("djklajfdlk111777&&&**"))
            {
                return "通过";
            }
            else
            {
                return "字符串验证不通过";
            }
        }

    }
}
